#include <iostream>
using namespace std;
#include <vector>
#include <algorithm>
#include <list>

/*自定义比较器*/
int myCompare(int vall, int val2)
{
    return val1 >val2;
}


int main()
{
#if 0
    
    vector<int> myVec={12,14,32,39,17,20,23,3,6,8,10,27,29,45,62};
    cout<<"排序前: "<<endl;
    for(int idx=0;idx<myVec.size();idx++)
    {
        cout<<myVec[idx]<<" "<<"\t";
    }
    cout<<endl;
    sort(myVec.begin(),myVec.end());
    for(int idx=0;idx<myVec.size();idx++)
    {
        cout<<myVec[idx]<<" "<<"\t";
    }
    cout<<endl;
#endif

    list<int> mylist = {12, 14, 17, 20, 3, 6, 39, 45, 62, 8, 10, 23, 27, 29, 32};
    cout << "排序前: " << endl;
    for (auto iter = mylist.begin(); iter != mylist.end(); iter++)
    {
        cout << *iter << "\t";
    }
    cout << endl;
    mylist.sout();
    //sort(mylist.begin(), mylist.end());
    for (auto iter = mylist.begin(); iter != mylist.end(); iter++)
    {
        cout << *iter << "\t";
    }
}
